﻿@model MyPSDALayer.Article
@{
    ViewBag.Title = "Edit";
} 
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Article</legend>
        @Html.HiddenFor(model => model.ArticleID)
        <div class="editor-label">
            @Html.LabelFor(model => model.ArticleName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ArticleName)
            @Html.ValidationMessageFor(model => model.ArticleName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TypeName)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TypeName, ViewBag.TypeList as SelectList)
            @Html.ValidationMessageFor(model => model.TypeName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISIndex)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISIndex)
            @Html.ValidationMessageFor(model => model.ISIndex)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISTop)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISTop)
            @Html.ValidationMessageFor(model => model.ISTop)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISTaobao)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISTaobao)
            @Html.ValidationMessageFor(model => model.ISTaobao)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ISHot)
        </div>
        <div class="editor-field">
            @Html.DropdownListYNFor(m => m.ISHot)
            @Html.ValidationMessageFor(model => model.ISHot)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Summary)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Summary)
            @Html.ValidationMessageFor(model => model.Summary)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ArticleContent)
        </div>
        <div class="editor-field">
            @Html.UEditorFor(o=>o.ArticleContent)
            @Html.ValidationMessageFor(model => model.ArticleContent)
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.CreateBy)
            @Html.ValidationMessageFor(model => model.CreateBy)
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.CreateDate)
            @Html.ValidationMessageFor(model => model.CreateDate)
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.ModifyBy)
            @Html.ValidationMessageFor(model => model.ModifyBy)
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.ModifyDate)
            @Html.ValidationMessageFor(model => model.ModifyDate)
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.CoverUrl)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
